package com.huawei;

import java.util.Scanner;

public class HJ035 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();

        int[][] dArr = new int[n][n];

        int incr = 1;
        for (int i = 0; i < n; i++) {
            int j = i;

            while(j>-1){
                dArr[j][i-j] = incr;
                incr++;
                j--;
            }
        }

        for (int i = 0; i < dArr.length; i++) {
            //这里需要注意下
            for (int j = 0; j < dArr[i].length-i; j++) {
                System.out.print(dArr[i][j]+" ");
            }
            System.out.println();
        }
    }
}
